home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / em7sui_1 / RADIOBUT.WR_ / RADIOBUT.WR
Text File  |  1998-09-17  |  2KB  |  92 lines

  1. #VRML V2.0 utf8
  2.  
  3. # Copyright Electrohouse 1998
  4.  
  5. # This file may not be copied, modified or distributed
  6. # in any way which violates the ProtoPak licensing 
  7. # agreement established by Electrohouse.  
  8.  
  9. EXTERNPROTO em7_RadioButton [
  10.     exposedField MFString caption
  11.     exposedField SFColor captionColor
  12.     field SFFloat height
  13.     field SFBool value
  14.     field SFInt32 controlIndex
  15.     eventIn SFBool set_value
  16.     eventIn SFInt32 set_activatedIndex
  17.     eventOut SFBool value_changed
  18.     eventOut SFTime touchTime
  19.     eventOut SFInt32 activatedIndex_changed
  20. ] "..\VR_UI.wrl#em7_RadioButton"
  21.  
  22. Transform { 
  23.     translation 3 -2 0
  24.     children [ 
  25.         DEF RED_SWITCH em7_RadioButton {
  26.             caption "Red light"    
  27.             value FALSE
  28.             captionColor 1 0 0
  29.         }
  30.     ]
  31. }
  32.  
  33. Transform { 
  34.     translation 3.125 -0.3 0
  35.     children [ 
  36.         DEF GREEN_SWITCH em7_RadioButton {
  37.             caption "Green light"    
  38.             value TRUE
  39.             height 0.75
  40.             captionColor 0 1 0
  41.         }
  42.     ]
  43. }
  44.  
  45. Transform { 
  46.     translation 3.25 1 0
  47.     children [ 
  48.         DEF BLUE_SWITCH em7_RadioButton {
  49.             caption "Blue light"    
  50.             value FALSE
  51.             height 0.5
  52.             captionColor 0 0 1
  53.         }
  54.     ]
  55. }
  56.  
  57. DEF RED_LIGHT DirectionalLight {
  58.     color 1 0 0
  59.     direction -1 -1 -1
  60. }
  61.  
  62.  
  63. DEF GREEN_LIGHT DirectionalLight {
  64.     color 0 1 0
  65.     direction -1 -1 -1
  66. }
  67.  
  68. DEF BLUE_LIGHT DirectionalLight {
  69.     color 0 0 1
  70.     direction -1 -1 -1
  71. }
  72.  
  73. Shape { 
  74.     appearance Appearance {
  75.         material Material {
  76.             diffuseColor 1 1 1
  77.             specularColor 0.9 0.9 0.9
  78.             ambientIntensity 0.8
  79.             shininess 1
  80.         }
  81.     }
  82.     geometry Box {}
  83. }
  84.  
  85. Viewpoint {
  86.     description "Radio button view"
  87.     position 3 0 10
  88. }
  89.  
  90. ROUTE RED_SWITCH.value_changed TO RED_LIGHT.on
  91. ROUTE GREEN_SWITCH.value_changed TO GREEN_LIGHT.on
  92. ROUTE BLUE_SWITCH.value_changed TO BLUE_LIGHT.on